export default [
  {
    path: '/user',
    layout: false,
    routes: [
      {name: '登录', path: '/user/login', component: './user/Login'},
      {component: './404'},
    ],
  },
  {path: '/home', name: '首页', layout: false, component: 'Home',hideInMenu: true},
  {path: '/goods/control', name: '货品管理', icon: 'reconciliation', access: 'admin', component: './Goods/GoodsControl'},
  {path: '/warehouse/control', name: '仓库管理', icon: 'wallet', access: 'admin', component: './Warehouse/WarehouseControl'},
  {path: '/manufactuer/control', name: '生产商管理', icon: 'smile', access: 'admin', component: './Manufacturer/ManufacturerControl'},
  {
    path: '/receipt',
    icon: 'bars',
    name: '单据管理',
    access: 'admin',
    routes: [
      {
        path: 'stockIn',
        name: '入库单管理',
        icon: 'smile',
        access: 'admin',
        routes: [
          {
            path: 'add',
            name: '入库单创建',
            icon: 'smile',
            component: './StockIn/StockInAdd',
          },
          {
            path: 'approval',
            name: '入库单审批',
            icon: 'smile',
            component: './StockIn/StockInApproval',
          },
          {
            path: 'visual',
            name: '入库单面板',
            icon: 'smile',
            component: './StockIn/StockInVisual',
          }
        ]
      },
      {
        path: 'stockOut',
        name: '出库单管理',
        icon: 'smile',
        routes: [
          {
            path: 'add',
            name: '出库单创建',
            icon: 'smile',
            component: './StockOut/StockOutAdd',
          },
          {
            path: 'approval',
            name: '出库单审批',
            icon: 'smile',
            component: './StockOut/StockOutApproval',
          },
          {
            path: 'visual',
            name: '出库单面板',
            icon: 'smile',
            component: './StockOut/StockOutVisual',
          }
        ]
      },
      {
        path: 'transfer',
        name: '调拨单管理',
        icon: 'smile',
        routes: [
          {
            path: 'add',
            name: '调拨单创建',
            icon: 'smile',
            component: './Transfer/TransferAdd',
          },
          {
            path: 'approval',
            name: '调拨单审批',
            icon: 'smile',
            component: './Transfer/TransferApproval',
          }
        ]
      },
      {
        path: 'cost',
        name: '账单管理',
        icon: 'smile',
        component: './Cost/CostControl',
      }
    ],
  },
  {path: '/stock', name: '库存管理', icon: 'smile', access: 'admin', component: './Stock/StockControl'},
  {path: '/materialUsage', name: '用料计划', icon: 'reconciliation', routes: [
      {path: 'add', name: '用料计划管理', icon: 'reconciliation', component: './MaterialUsagePlan/MaterialUsagePlanAdd'},
      {path: 'stockDiff', name: '缺货信息', icon: 'smile', access: 'admin', component: './MaterialUsagePlan/StockDiffPage'},
    ]},
  {
    path: '/data/visual',
    name: '数据可视化',
    icon: 'pieChart',
    access: 'admin',
    routes: [
      {path: 'stock-in-out-count', name: '出入库仓库汇总', icon: 'smile', component: './Charts/StockInOutChart'},
      {path: 'stock-out-amount', name: '出库金额汇总', icon: 'smile', component: './Charts/StockOutAmountChart'},
      {path: 'stock-in-goods-quantity', name: '入库货品数量', icon: 'smile', component: './Charts/StockInGoodsChart'},
      {path: 'stock-out-goods-quantity', name: '出库货品数量', icon: 'smile', component: './Charts/StockOutGoodsChart'},

    ]
  },
  {path: '/', redirect: '/goods/control'},
  {component: './404'},
];
